package com.bawei.module_repair.api

import com.bawei.lib_net.NetModules
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import retrofit2.Retrofit
import javax.inject.Qualifier
import javax.inject.Singleton

@Module
@InstallIn(SingletonComponent::class)
class RepairModel {
    @Provides
    @Singleton
    @CommonApi
    fun provideApi(@NetModules.CommonRetrofit retrofit: Retrofit):RepairApi{
        return retrofit.create(RepairApi::class.java)
    }
    @Provides
    @Singleton
    @SignApi
    fun provideSignApi(@NetModules.SignRetrofit retrofit: Retrofit):RepairApi{
        return retrofit.create(RepairApi::class.java)
    }
    @Qualifier
    @Retention(AnnotationRetention.BINARY)
    annotation class CommonApi
    @Qualifier
    @Retention(AnnotationRetention.BINARY)
    annotation class SignApi
}